import request from '@/utils/request'

// 优惠券批次列表接口
export function ticketList(query) {
  return request({
    url: 'ticket',
    method: 'get',
    params: query
  })
}
// 获取上架服务
export function serviceList(query) {
  return request({
    url: 'service',
    method: 'get',
    params: query
  })
}
// 优惠券创建
export function ticketAdd(query) {
  return request({
    url: 'ticket/save',
    method: 'POST',
    data: query
  })
}

// 体验券详情
export function detailInfo(query) {
  return request({
    url: `ticket/detail`,
    method: 'GET',
    params: query
  })
}
// 体验券详情-优惠券使用列表
export function detailTableInfo(query) {
  return request({
    url: `ticket/detail_list`,
    method: 'GET',
    params: query
  })
}
// 编辑
export function updatePut(query) {
  return request({
    url: `ticket/update`,
    method: 'post',
    data: query
  })
}
// 改变状态
export function changeStatus(query) {
  return request({
    url: `ticket/change_status`,
    method: 'post',
    data: query
  })
}